package com.example.day22.ex03;

public class FlyableDemo {
    public static void main(String[] args) {
        useFlyable(new Flyable() {
            @Override
            public void fly(String s) {
                System.out.println(s);
                System.out.println("多态调用");
            }
        });
        System.out.println("-----------------");
        useFlyable((String s) -> {
            System.out.println(s);
            System.out.println("lambda调用");
        });
    }

    public static void useFlyable(Flyable f) {
        f.fly("hello");
    }
}
